﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace TankBattle.Models
{
    public class Constant
    {
        public const int ZERO = 0;
        #region Life

        public const int LIFE_UNDEAD = 100;
        public const int LIFE_BRICK = 1;
        public const int LIFE_STONE = 2;

        #endregion 

        #region Move

        public const int MOVE_LEFT  = 1;
        public const int MOVE_RIGHT = 2;
        public const int MOVE_UP    = 3;
        public const int MOVE_DOWN  = 4;

        //Sai số di chuyển
        public const int MOVE_RADIUS_X = 10;
        public const int MOVE_RADIUS_Y = 10;

        #endregion 

        #region Bullet

        public const int BULLET_WIDTH           = 40;
        public const int BULLET_HEIGHT          = 40;
        public const int BULLET_STEP            = 2;
        public const int BULLET_SHEET_SIZE_X    = 2;
        public const int BULLET_SHEET_SIZE_Y    = 3;

        //các loại đan
        public const int BULLET_TYPE_NORMAL = 0;
        public const int BULLET_TYPE_ROCKET = 1;
        public const int BULLET_TYPE_BIGBAG = 2;
        //Chuỗi hình ảnh cho các loại đạn
        public const string BULLET1 = @"Images/Bullets/Bullet";
        public const string BULLET2 = @"Images/Bullets/Rocket";
        public const string BULLET3 = @"Images/Bullets/BigBang";


        #endregion

        #region Obstruction

        public const int OBSTRUCTION_WIDTH  = 70;
        public const int OBSTRUCTION_HEIGHT = 70;

        #endregion

        #region Tank

        public const int TANK_SIZE_WIDTH = 70;
        public const int TANK_SIZE_HEIGHT = 70;
        public const int TANK_SPEED_NORMAL = 1;
        public const int TANK_SPEED_FAST = 2;
        public const int TANK_SPEED_SLOW = 3;
        public const int TANK_DAMAGE_NORMAL = 1;
        public const int TANK_DAMAGE_HIGHT = 2;
        public const int TANK_LIFE_BONUS = 1;
        public const int TANK_SHOOT_DELAY = 100;
        public const int TANK_SHOOT_SPEED = 1;
        public const int TANK_SHEET_X = 3;
        public const int TANK_SHEET_Y = 7;

        #endregion 

        #region Item

        public const int ITEM_WIDTH = 60;
        public const int ITEM_HEIGHT = 60;
        public const int ITEM_SHEET_SIZE_X = 5;
        public const int ITEM_SHEET_SIZE_Y = 5;
        public const int ITEM_LIFE = 1000;
        public const int ITEM_CREATE_TIME = 300;
        public const int ITEM_SHOW_DELAY = 10;
        //sheet item
        public const string ITEM_IMAGE_SPEED = "Images/Items/Speed";
        public const string ITEM_IMAGE_ROCKET = "Images/Items/Rocket";
        public const string ITEM_IMAGE_BONUS_LIFE = "Images/Items/BonusLife";
        public const string ITEM_IMAGE_SHOOT_SPEED = "Images/Items/ShootSpeed";

        #endregion 

        #region Portral
        public const int PORTRAL_WIDTH = 70;
        public const int PORTRAL_HEIGHT = 70;
        public const int PORTRAL_SIZE_X = 70;
        public const int PORTRAL_SIZE_Y = 70;
        public const int PORTRAL_SHEET_X = 6;
        public const int PORTRAL_SHEET_Y = 1;
        public const int PORTRAL_RADIUS = 10;
        #endregion

        #region Velocity

        public const int V1_BULLET = 1;
        public const int V1_TANK = 1;

        #endregion 

        #region Rate

        public const int RATE_BULLET = 1;
        public const int RATE_ITEM = 1;
        public const int RATE_TANK = 0;
        public const int RATE_TANK_SHOOT = 50;
        public const int RATE_SHOOT = 1;
        //rate của các sprite
        public const int RATE_BOOM = 3;
        public const int RATE_BOOM_SHOOT = 1;
        public const int RATE_PORTRAL = 1;

        #endregion

        #region Frame

        public const int FRAME_LEFT = 0;
        public const int FRAME_RIGHT = 1;
        public const int FRAME_UP = 2;
        public const int FRAME_DOWN = 3;
        public const int FRAME_SHOOT_LR = 4;
        public const int FRAME_SHOOT_RL = 5;
        public const int FRAME_SHOOT_UP = 6;
        public const int FRAME_SHOOT_DOWN = 7;

        #endregion 

        #region Player

        public const int PLAYER_START_LIFE = 3;
        public const int PLAYER_START_SCORE = 0;
        public const int PLAYER_START_LEVEL = 0;
        
        //PLAYER STATUS
        public const int PLAYER_STATUS_WIN = 3;
        public const int PLAYER_STATUS_LOSE = 4;

        public const int PLAYER_UP_SCORE = 100;


        #endregion 

        #region GameWorld

        public const int SCREEN_WIDTH = 0;
        public const int SCREEN_HEIGHT = 0;
        public const int BOX_WIDTH = 770;
        public const int BOX_HEIGHT = 700;
        public const int MAP_WIDTH = 11;
        public const int MAP_HEIGHT = 10;
        public const int CELL = 70;
        //Trạng thái game
        public const int STATUS_PLAYING = 1;
        public const int STATUS_PAUSE = 2;
        public const int STATUS_END = 3;
        public const int STATUS_NEW = 4;
        public const int STATUS_INTRO = 5;
        public const int STATUS_WAIT = 6;

        #endregion 

        #region Object

        //Các loại vật cản
        public const int OBSTRUCTION_STONE = 1;
        public const int OBSTRUCTION_GRASS = 2;
        public const int OBSTRUCTION_RIVER = 3;
        public const int OBSTRUCTION_BRICK = 4;
        public const int PORTRAL = 5;

        //Các loại item
        public const int ITEM_SPEED = 11;
        public const int ITEM_ROCKET = 12;
        public const int ITEM_BONUS_LIFE = 13;
        public const int ITEM_SHOOT_SPEED = 14;
        public const int ITEM_OVER = 19;
    

        //Các loại Tank
        public const int TANK_PLAYER = 21;
        public const int TANK_ARMY1 = 22;
        public const int TANK_ARMY2 = 23;
        public const int TANK_ARMY3 = 24;

        #endregion

        #region Effect

        //Thông số kỹ thuật.
        public const int BOOM_SIZE = 100;
        public const int BOOM_SHEET_X = 7;
        public const int BOOM_SHEET_Y = 0;
        public const int BOOM_SHOOT_SIZE = 40;
        public const int BOOM_SHOOT_SHEET_X = 3;
        public const int BOOM_SHOOT_SHEET_Y = 3;
        public const int BOOM_ITEM_SIZE = 100;
        public const int BOOM_ITEM_SHEET_X = 7;
        public const int BOOM_ITEM_SHEET_Y = 0;
        public const int BOOM_BROKEN_SIZE = 100;
        public const int BOOM_BROKEN_SHEET_X = 7;
        public const int BOOM_BROKEN_SHEET_Y = 0;
        public const int BOOM_UNBREAK_SIZE = 64;
        public const int BOOM_UNBREAK_SHEET_X = 4;
        public const int BOOM_UNBREAK_SHEET_Y = 4;
   
        //link dẫn đến texture
        public const string BOOM_SHOOT_IMAGE = @"Images/Effects/shootBoom";
        public const string BOOM_TANK_IMAGE = @"Images/Effects/tankBoom";
        public const string BOOM_ITEM = @"Images/Effects/itemBoom";
        public const string BOOM_BROKEN_IMAGE = @"Images/Effects/BrokenBoom";
        public const string BOOM_UNBREAK_IMAGE = @"Images/Effects/UnBreakBoom";

        #endregion 

        #region Scene
        //SCENE INTRO
        public const string SCENE_INTRO1_IMAGE = "Images/Scenes/Intro/Intro1";
        public const int SCENE_INTRO1_WIDTH = 300;
        public const int SCENE_INTRO1_HEIGH = 150;
        public const int SCENE_INTRO1_SHEET_X = 4;
        public const int SCENE_INTRO1_SHEET_Y =1;
        public const int SCENE_INTRO1_RATE = 5;
        public const int SCENE_INTRO1_POSITION_X = 250;
        public const int SCENE_INTRO1_POSITION_Y = 200;

        //SCENE WAIT
        public const string SCENE_WAIT_IMAGE = "Images/Scenes/Wait/wait4";
        public const int SCENE_WAIT_WIDTH = 100;
        public const int SCENE_WAIT_HEIGH = 100;
        public const int SCENE_WAIT_SHEET_X = 5;
        public const int SCENE_WAIT_SHEET_Y = 0;
        public const int SCENE_WAIT_RATE = 5;
        public const int SCENE_WAIT_POSITION_X = 350;
        public const int SCENE_WAIT_POSITION_Y = 300;

        //SCENE PAUSE
        public const string SCENE_PAUSE_IMAGE = "Images/Scenes/Pause/Pause";
        public const int SCENE_PAUSE_WIDTH = 300;
        public const int SCENE_PAUSE_HEIGH = 100;
        public const int SCENE_PAUSE_SHEET_X = 0;
        public const int SCENE_PAUSE_SHEET_Y = 0;
        public const int SCENE_PAUSE_RATE = 0;
        public const int SCENE_PAUSE_POSITION_X = 150;
        public const int SCENE_PAUSE_POSITION_Y = 300;

        #endregion
    }
}
